﻿
@{
    ViewBag.Title = Resources.WebStringsWeb.WebTitle;
    Layout = "~/Views/Shared/_LayoutMain.cshtml";
}
@section css {

}
<div class="page-content" ng-cloak ng-controller="HomeController" ng-init="
     TotalCount = 0;
     CompleteCount = 0;
     IncompleteCount=0;
     OverdueCount = 0;
     GetIncompleteDailyCheckTask();
     GetCompleteDailyCheckTask();
     GetHiddenTroubleTaskList();
     GetHiddenTroubleCompleteList();
     GetIssueReportTaskList();
     GetIssueReportCompleteTaskList();
     GetSepcialCheckTask();
     GetSepcialCheckCompleteTask();
     GetDeviceTask();
     ">
    <div class="page-heading">
        <h1>我的待办</h1>
        <div class="options">
            <div class="btn-toolbar">

            </div>
        </div>
    </div>
    <ol class="breadcrumb">
        <li><a>主页</a></li>
        <li class="active"><a>我的待办</a></li>
    </ol>
    <div class="row">
        <div class="col-sm-3">
            <a href="#" class="info-tiles tiles-midnightblue">
                <div class="tiles-heading">
                    今日待办
                </div>
                <div class="tiles-body">
                    <div class="easypiechart" id="bandwidth" data-percent="42">
                        <span ng-bind="CompleteCount+IncompleteCount"></span>
                        <canvas height="120" width="120" style="height: 80px; width: 80px;"></canvas>
                    </div>
                </div>
            </a>
        </div>
        <div class="col-sm-3">
            <a href="#" class="info-tiles tiles-primary">
                <div class="tiles-heading">
                    已处理
                </div>
                <div class="tiles-body">
                    <div class="easypiechart" id="serverload" data-percent="31">
                        <span ng-bind="CompleteCount"></span>
                        <canvas height="120" width="120" style="height: 80px; width: 80px;"></canvas>
                    </div>
                </div>
            </a>
        </div>
        <div class="col-sm-3">
            <a href="#" class="info-tiles tiles-grape">
                <div class="tiles-heading">
                    未处理
                </div>
                <div class="tiles-body">
                    <div class="easypiechart">
                        <span ng-bind="IncompleteCount"></span>
                        <canvas height="120" width="120" style="height: 80px; width: 80px;"></canvas>
                    </div>
                </div>
            </a>
        </div>
        <div class="col-sm-3">
            <a href="#" class="info-tiles tiles-orange">
                <div class="tiles-heading">
                    即将到期
                </div>
                <div class="tiles-body">
                    <div class="easypiechart" id="ramusage" data-percent="76">
                        <span ng-bind="OverdueCount"></span>
                        <canvas height="120" width="120" style="height: 80px; width: 80px;"></canvas>
                    </div>
                </div>
            </a>
        </div>
    </div>
    <div class="row">
        <div class="col-md-6 bs-grid">
            <div class="panel panel-default panel-btn-focused" id="p1">
                <div class="panel-heading">
                    <h2>日常检查待办</h2>
                </div>
                <div class="panel-body panel-no-padding panel-tasks">
                    <h4 class="task-header">待检查</h4>
                    <ul class="connectedSortable" id="sortable-tasks" style="min-height: 400px; max-height: 400px; overflow: scroll; ">
                        <li ng-show="DailyCheckTaskList==null || DailyCheckTaskList.length==0">
                            <span class="drag-handle">
                                <p style="line-height:37px;"></p>
                            </span>
                            <p>暂无待办项</p>
                        </li>
                        <li ng-class="{'item-orange':x.OVerdueDays<=2,'item-warning':x.OVerdueDays<5 && x.OVerdueDays > 2,'item-success':x.OVerdueDays>=5}" ng-repeat="x in DailyCheckTaskList">
                            <span class="drag-handle">
                                <p style="line-height:37px;"> {{$index+1}}.</p>
                            </span>
                            <p style="width:100%;">
                                {{x.PlaceName}}-{{x.CheckTypeName}}
                                <b style="float:right;margin-right:50px;">{{x.StartTime|JSONDate:'yyyy-MM-dd'}} ~ {{x.EndTime|JSONDate:'yyyy-MM-dd'}}</b>
                            </p>

                            <a href="../PlaceSafety/PlaceCheckFormAdd?CheckTypeId={{x.CheckType}}&PlaceId={{x.PlaceId}}&RoomId={{x.RoomId}}&PlaceName={{x.PlaceName}}&PageName=../Home/WorkTask" class="btn btn-xs btn-default task-options"><i class="fa fa-pencil"></i></a>
                        </li>
                    </ul>
                    <h4 class="task-header"><i class="fa fa-check"></i> 已完成任务</h4>
                    <ul class="task-completed connectedSortable" id="completed-tasks">
                        <li ng-show="DailyCheckCompleteTaskList==null || DailyCheckCompleteTaskList.length==0">
                            <p>暂无数据</p>
                        </li>
                        <li class="item-inverse" ng-repeat="x in DailyCheckCompleteTaskList">
                            <span class="drag-handle">
                                <p style="line-height:37px;">  {{$index+1}}.</p>
                            </span>
                            <p style="width:100%;">
                                {{x.PlaceName}}-{{x.CheckTypeName}}
                                <b style="float:right;margin-right:50px;">{{x.StartTime|JSONDate:'yyyy-MM-dd'}} ~ {{x.EndTime|JSONDate:'yyyy-MM-dd'}}</b>
                            </p>

                        </li>
                    </ul>
                    <div class="tasks-footer clearfix">
                        @*<a href="#" class="btn btn-sm btn-success"><i class="fa fa-plus"></i> <span class="hidden-xs">New</span></a>
                            <a href="#" class="btn btn-sm btn-default"><i class="fa fa-check"></i> <span class="hidden-xs">Mark All Done</span></a>*@
                        @* <a href="../Safety/" class="btn-link btn-sm pull-right" style="padding-right: 0">去完成</a>*@
                    </div>
                </div>
            </div>
        </div>
        <div class="col-md-6 bs-grid" ng-cloak>
            <div class="panel panel-default panel-btn-focused" id="p1">
                <div class="panel-heading">
                    <h2>问题治理待处理</h2>
                </div>
                <div class="panel-body panel-no-padding panel-tasks">
                    <h4 class="task-header">待处理</h4>
                    <ul class="connectedSortable" id="sortable-tasks" style="min-height: 400px; max-height: 400px; overflow: scroll; ">
                        <li ng-show="HiddenTroubleTaskList==null || HiddenTroubleTaskList.length==0">
                            <span class="drag-handle">
                                <p style="line-height:37px;"></p>
                            </span>
                            <p>暂无待办项</p>
                        </li>
                        <li class="item-warning" ng-repeat="x in HiddenTroubleTaskList">
                            <span class="drag-handle">
                                <p style="line-height:37px;"> {{$index+1}}.</p>
                            </span>
                            <p style="width:100%;">
                                {{x.PlaceName}} - 单号:<b>{{x.FormNo}}</b><span ng-show="x.Status==1">待添加措施</span>&nbsp;&nbsp;<span ng-show="x.Status==2">待整改</span><span ng-show="x.Status==4">待复查</span><span ng-show="x.Status==0">被驳回</span>
                                <b style="float:right;margin-right:50px;">{{x.StartTime|JSONDate:'yyyy-MM-dd'}}  <t ng-show="x.EndTime!=null">~{{x.EndTime|JSONDate:'yyyy-MM-dd'}}</t></b>
                            </p>
                            @*<a href="#" class="btn btn-xs btn-default task-options"><i class="fa fa-pencil"></i></a>*@
                        </li>
                    </ul>
                    <h4 class="task-header"><i class="fa fa-check"></i> 已完成任务</h4>
                    <ul class="task-completed connectedSortable" id="completed-tasks">
                        <li class="item-primary" ng-show="HiddenTroubleCompleteList.length==0"><p>暂无数据...</p></li>
                        <li class="item-primary" ng-repeat="x in HiddenTroubleCompleteList">
                            <span class="drag-handle">
                                <p style="line-height:37px;">  {{$index+1}}.</p>
                            </span>
                            <p>
                                {{x.PlaceName}} - 单号:<b>{{x.FormNo}}</b><span ng-show="x.Status==1">待添加措施</span>&nbsp;&nbsp;<span ng-show="x.Status==2">待整改</span><span ng-show="x.Status==4">待复查</span><span ng-show="x.Status==0">被驳回</span>
                                <b style="float:right;margin-right:50px;">{{x.StartTime|JSONDate:'yyyy-MM-dd'}} ~ {{x.EndTime|JSONDate:'yyyy-MM-dd'}}</b>
                            </p>

                            @*<a href="#" class="btn btn-xs btn-default task-options"><i class="fa fa-pencil"></i></a>*@
                        </li>

                    </ul>
                    <div class="tasks-footer clearfix">
                        <a ng-show="HiddenTroubleTaskList.length>0" href="../HiddenTrouble/HiddenTroubleRectification" class="btn-link btn-sm pull-right" style="padding-right: 0">去完成</a>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-md-6 bs-grid">
            <div class="panel panel-default panel-btn-focused" id="p1">
                <div class="panel-heading">
                    <h2>问题上报待处理</h2>
                </div>
                <div class="panel-body panel-no-padding panel-tasks">
                    <h4 class="task-header">待处理</h4>
                    <ul class="connectedSortable" id="sortable-tasks" style="min-height: 400px; max-height: 400px; overflow: scroll; ">
                        <li ng-show="IssueTaskList==null || IssueTaskList.length==0">
                            <span class="drag-handle">
                                <p style="line-height:37px;"></p>
                            </span>
                            <p>暂无待办项</p>
                        </li>
                        <li class="item-warning" ng-repeat="x in IssueTaskList">
                            <span class="drag-handle">
                                <p style="line-height:37px;"> {{$index+1}}.</p>
                            </span>
                            <p style="width:100%;">
                                单号：{{x.FormNo}}  {{x.PlaceName}}{{x.Description}}
                                <b style="float:right;margin-right:50px;">{{x.SubmitTime| JSONDate: 'yyyy-MM-dd'}}</b>
                            </p>
                            <a href="../IssueReport/IssueDealList?Id={{x.Id}}" class="btn btn-xs btn-default task-options"><i class="fa fa-pencil"></i></a>
                        </li>

                    </ul>
                    <h4 class="task-header"><i class="fa fa-check"></i> 已完成任务</h4>
                    <ul class="task-completed connectedSortable" id="completed-tasks">
                        <li class="item-primary" ng-show="IssueCompleteTaskList.length==0"><p>暂无数据...</p></li>
                        <li class="item-primary" ng-repeat="x in IssueCompleteTaskList">
                            <span class="drag-handle">
                                <p style="line-height:37px;"> {{$index+1}}.</p>
                            </span>
                            <p style="width:100%;">
                                单号：{{x.FormNo}}  {{x.PlaceName}}{{x.Description}}
                                <b style="float:right;margin-right:50px;">@DateTime.Now.ToString("yyyy-MM-dd")</b>
                            </p>
                        </li>
                    </ul>
                    <div class="tasks-footer clearfix">
                        <a href="../IssueReport/IssueDealList" class="btn-link btn-sm pull-right" style="padding-right: 0">去完成</a>
                    </div>
                </div>
            </div>
        </div>

        <div class="col-md-6 bs-grid">
            <div class="panel panel-default panel-btn-focused" id="p1">
                <div class="panel-heading">
                    <h2>专项检查待办</h2>
                </div>
                <div class="panel-body panel-no-padding panel-tasks">
                    <h4 class="task-header">待检查</h4>
                    <ul class="connectedSortable" id="sortable-tasks" style="min-height: 400px; max-height: 400px; overflow: scroll; ">
                        <li ng-show="SepcialCheckTaskList==null || SepcialCheckTaskList.length==0">
                            <span class="drag-handle">
                                <p style="line-height:37px;"></p>
                            </span>
                            <p>暂无待办项</p>
                        </li>
                        <li class="item-warning" ng-repeat="x in SepcialCheckTaskList">
                            <span class="drag-handle">
                                <p style="line-height:37px;"> {{$index+1}}.</p>
                            </span>
                            <p style="width:100%;">
                                {{x.Description}}  <b style="float:right;margin-right:50px;">{{x.StartTime|JSONDate:'yyyy-MM-dd'}} ~ {{x.EndTime|JSONDate:'yyyy-MM-dd'}}</b>
                            </p>
                            <a ng-show="x.Status==1" href="../CheckForm/SpecialCheckAdd?Id={{x.SCheckTaskId}}&task={{x.TaskName}}&pagename=../home/worktask" class="btn btn-xs btn-default task-options"><i class="fa fa-pencil"></i></a>
                            <a ng-show="x.Status==2" href="../CheckForm/SpecialCheckRecordList?FormId={{x.SCheckFormId}}&TaskId={{x.SCheckTaskId}}&TaskName={{x.TaskName}}&pagename=../home/worktask" class="btn btn-xs btn-default task-options"><i class="fa fa-pencil"></i></a>
                        </li>
                    </ul>
                    <h4 class="task-header"><i class="fa fa-check"></i> 已完成任务</h4>
                    <ul class="task-completed connectedSortable" id="completed-tasks">
                        <li class="item-primary" ng-show="SepcialCheckCompleteTaskList.length==0"><p>暂无数据...</p></li>
                        <li class="item-primary" ng-repeat="x in SepcialCheckCompleteTaskList">
                            <span class="drag-handle">
                                <p style="line-height:37px;"> {{$index+1}}.</p>
                            </span>
                            <p style="width:100%;">
                                {{x.TaskName}}-<span ng-show="x.Status==1">待检查</span><span ng-show="x.Status==2">待审核</span>
                                <b style="float:right;margin-right:50px;">@DateTime.Now.ToString("yyyy-MM-dd")</b>
                            </p>
                        </li>
                    </ul>
                    <div class="tasks-footer clearfix">
                        <a href="../IssueReport/IssueDealList" class="btn-link btn-sm pull-right" style="padding-right: 0">去完成</a>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-md-6 bs-grid">
            <div class="panel panel-default panel-btn-focused">
                <div class="panel-heading">
                    <h2>设施设备维保到期提醒</h2>
                </div>
                <div class="panel-body panel-no-padding panel-tasks">
                    <h4 class="task-header">待检查</h4>
                    <ul class="connectedSortable" id="sortable-tasks" style="min-height: 400px; max-height: 400px; overflow: scroll; ">
                        <li ng-show="DeviceTask==null || DeviceTask.length==0">
                            <span class="drag-handle">
                                <p style="line-height:37px;"></p>
                            </span>
                            <p>暂无待办项</p>
                        </li>
                        <li class="item-warning" ng-repeat="x in DeviceTask">
                            <span class="drag-handle">
                                <p style="line-height:37px;"> {{$index+1}}.</p>
                            </span>
                            <p style="width:100%;">
                                {{x.PlaceName}} {{x.DeviceName}}   <b style="float:right;margin-right:50px;"><span ng-if="x.LastMaintance!=null">【上次维保：{{x.LastMaintance.MaintainceDate|JSONDate:'yyyy-MM-dd'}}】  【维保频次：{{x.MaintenanceInterval}}】</span> 维保到期：{{x.NextMaintainceDate|JSONDate:'yyyy-MM-dd'}}</b>
                            </p>
                            <a  href="../PlaceSafety/EquipmentList?DeviceId={{x.Id}}&RoomId={{x.RoomId}}&PlaceName={{x.PlaceName}}&pagename=../home/worktask" class="btn btn-xs btn-default task-options"><i class="fa fa-pencil"></i></a>
                        </li>
                    </ul>                    
                    <div class="tasks-footer clearfix">
                        <a href="../IssueReport/IssueDealList" class="btn-link btn-sm pull-right" style="padding-right: 0"></a>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-md-6 bs-grid">
            <div class="panel panel-default panel-btn-focused">
                <div class="panel-heading">
                    <h2>应急事件上报待处理</h2>
                </div>
                <div class="panel-body panel-no-padding panel-tasks">
                    <h4 class="task-header">待处理</h4>
                    <ul class="connectedSortable" id="sortable-tasks">
                        
                    </ul>
                    <h4 class="task-header"><i class="fa fa-check"></i> 已完成任务</h4>
                    <ul class="task-completed connectedSortable" id="completed-tasks">

                    </ul>
                    <div class="tasks-footer clearfix">
                        <a href="#" class="btn-link btn-sm pull-right" style="padding-right: 0">去完成</a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>


    @section Js{
        <script src="~/Assets/js/pg/Home.js?v=@DateTime.Now.ToString("yyMMddHHmmss")"></script>
    }

